def judge(li):
    for i in range(int(len(li))-1):
        if li[i] != li[len(li)-i-1]:
            return 0
    return 1

str = input()
li = str.split(',')
print(judge(li))

